// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

Shader "Custom/s2"
{
    Properties
    {
        _Color ("Color", Color) = (1, 1, 1, 1)
        _Vector ("Vector", Vector) = (1, 2, 3, 4)
        _Int ("Int", Int) = 24234
        _Float ("Float", Float) = 4.5
        _Range ("Range", Range(1, 11)) = 6
    }
    SubShader
    {
        Pass
        {
            CGPROGRAM
            
            # pragma vertex vert
            # pragma fragment frag

            struct a2v
            {
                float4 vertex : POSITION;
                float3 normal : NORMAL;
                float4 textcoord : TEXCOORD0;
            };

            struct v2f
            {
                float4 position: SV_POSITION;
                float3 temp: COLOR0;
            };
            
            v2f vert(a2v v)
            {
                // float4 pos = UnityObjectToClipPos(v.vertex);
                // return pos;
                v2f f;
                f.position = UnityObjectToClipPos(v.vertex);
                // f.position = mul(UNITY_MATRIX_MVP, v.vertex);
                f.temp = v.normal;
                return f;
            }
            
            // float4 vert(float4 v : POSITION) : SV_POSITION
            // {
            //     float4 pos = UnityObjectToClipPos(v);
            //     return pos;
            // }

            float4 frag(v2f f) : SV_Target{
                return fixed4(f.temp, 1);
                // fixed4 _Color;
                // return _Color;
            }
            
            ENDCG
        }
    }
//    FallBack "VertexLit"
}
